# 3

class Ob:
    def __init__(self, name):
        self.name = name
        self.items = ['1', '2']
        self.inset = 0

    def __repr__(self):
        if self.inset == 0:
            return str(self.items)
        else:
            return "<Ob name={} items={}>".format(self.name, self.items)
            self.inset = 0

    def __setitem__(self, key, value):
        self.items[key] = value

    def __mul__(self, other):
        self.items = self.items * other

    def __len__(self):
        return len(self.items)

    def __delitem__(self, key):
        del self.items[key]

    def __hash__(self):
        self.inset += 1
        return hash(self.name)

    def __eq__(self, other):
        return self.name == other.name

a = Ob('tom')
b = Ob('tom')
print('a: ', a)
a[0] = 'a'
print('a: ', a)
a * 3
print('len: ', len(a))
del a[1]
print('a: ', a)

print('set: ', {a, b})

